﻿using Autofac;
using Application.Implement;
using Application.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Facade;

namespace AutofacConsoleApplication3
{
    public static class Staup
    {
        private static IContainer _container;

        public static T Resolve<T>()
        {
            return _container.Resolve<T>();
        }

        public static void Init()
        {
            var builder = new ContainerBuilder();
            builder.RegisterType<FileLog>().AsImplementedInterfaces();
            builder.RegisterType<LogHelper>();
            _container = builder.Build();
        }
    }
}
